<!--{template user/header}-->
<div class="container">
  <div class="nav-action">
		<!--{template user/left_side}-->
  </div>
  <!-- nav-action end -->
  <div class="content-panel">
      <div class="tab">
        <a class="selected"  data-toggle="tab">店铺设置</a>
      </div>
      <div class="tab_detail">
      		<!-- 店铺设置 start -->
          <form role="form" action="{$strUrl}" method="post" class="form-horizontal" name="editShopForm" id="editShopForm">
          	<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}">
            <div class="form-group">
              <label class="col-sm-2 control-label" for="shop_name">店铺名称：</label>
                <div class="col-sm-8">
                  <input type="text"  name="shop_name" id="shop_name"  class="form-control" value="{$shopInfo['shop_name']}">
                </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="shop_slogans">个性签名：</label>
              <div class="col-sm-8">
                 <textarea id="shop_slogans" name="shop_slogans" rows="5"   class="form-control">{$shopInfo['shop_slogans']}</textarea>
				 <span class="help-block"><i class="fa"></i>您的店铺广告语直接影响到他人对您的第一印象，请慎重对待。</span>
              </div>
            </div>
			<div class="form-group">
              <label class="col-sm-2 control-label">所在地：</label>
              <div class="col-sm-10 row">
                <div class="col-sm-3">
                  <select class="form-control" name="province" id="province" onchange="getZone(this.value,'city');">
                  	<option>选择省份</option>
					{loop $arrProvinces $k $v}
					<option value="{$v['id']}" {if $shopInfo['province']==$v[id]}selected="selected"{/if}>{$v['name']}</option>
					{/loop}
                  </select>
                  </div>
                <div class="col-sm-3">
                  <select class="form-control" name="city" id="city" onchange="getZone(this.value,'area');">
                  	<option>选择城市</option>
					{if $shopInfo['city']}
					<option value="{$arrCity['id']}" selected="selected">{$arrCity['name']}</option>
					{/if}
                  </select>
                </div>
               <div class="col-sm-3">
                  <select class="form-control" name="area" id="area" >
                  	<option>选择区域</option>
					{if $shopInfo['area']}
					<option value="{$arrArea['id']}" selected="selected">{$arrArea['name']}</option>
					{/if}
                  </select>
                </div>
              </div>
            </div>
			<div class="form-group">
		      	<label class="col-sm-2 control-label" for="address">详细地址：</label>
		        <div class="col-sm-4">
		          <input type="hidden"  name="address" id="address"  class="form-control" value="{$shopInfo['address']}">
				  <div id="span_address" style="padding-top:8px;">{$shopInfo['address']}</div>
		    	</div>
				<div class="col-sm-4">
					<input type="hidden" name="coordinate" id="coordinate" value="{$shopInfo['coordinate']}">
					{if $shopInfo['coordinate']}
		          <a href="javascript:showMap('{$gUserInfo[uid]}');" class="btn btn-default btn-sm">查看地图</a><a href="javascript:setMap('{$gUserInfo[uid]}');" class="btn btn-default btn-sm">重新定位</a>
				  {else}
				  <a href="javascript:setMap('{$gUserInfo[uid]}');" class="btn btn-default btn-sm">标注地图</a>
				  {/if}
		    	</div>
		  	</div>
			<div class="form-group">
		      	<label class="col-sm-2 control-label" for="address">店铺头部图片</label>
		        <div class="col-sm-6">
		       <!--   <a href="javascript:changeBanner('{$uid}');void(0);" id="change_banner">点击更改图片</a>-->
			   		<div class="modal-body">
			            <p class="text-info mb_10"><i class="fa fa-info-circle"></i> <strong>提示</strong> 最佳图片尺寸：1200*280像素</p>
			            <img id="banner_img" onerror="this.src='tpl/default/img/store_banner.jpg'" src="{if $shopInfo['banner']}{$shopInfo['banner']}{else}tpl/default/img/store_banner.jpg{/if}" alt="banner" class="img-responsive mb_20">
					 	<input type="file" class="file" name="upload1" id="upload1">
					 	<input type="hidden"  name="file_id" id="fileid"  class="form-control">
					 	<input type="hidden"  name="banner" id="banner_path"  class="form-control">
			        </div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label" for="address">店铺背景图片</label>
					<div id="bground" class="modal-body col-sm-6">
		                <p class="text-info mb_10">
		                    <i class="fa fa-info-circle"></i> <strong>提示</strong>
		                    店铺背景图片,宽度必须为950px。支持.jpg,.gif,.png,.jpeg格式。
		                </p>
		                <img id="background_img" class="img-responsive mb_20" onerror="this.src='tpl/default/img/store_banner.jpg'" src="{if $shopInfo['shop_background']}{$shopInfo['shop_background']}{else}tpl/default/img/store_banner.jpg{/if}">
		                <div class="form-inline pull-right">
		                    <div class="checkbox">
		                        <label>
		                          <input type="checkbox" name="repeat" value="repeat-x" {if $arrBackgroudStyle['repeat']=='repeat-x'}checked="checked"{/if}> 平铺
		                        </label>
		                      </div>
		                    <select id="position" name="position" class="form-control">
		                        <option value="left top" {if $arrBackgroudStyle['position']=='left top'}selected="selected"{/if}>居中对齐</option>
		                        <option value="center top" {if $arrBackgroudStyle['position']=='center top'}selected="selected"{/if}>居左对齐</option>
		                        <option value="right top" {if $arrBackgroudStyle['position']=='right top'}selected="selected"{/if}>居右对齐</option>
		                     </select>
		                </div>
						 <input type="file" class="file" name="upload2" id="upload2">
						 <input type="hidden"  name="file_id" id="fileid"  class="form-control">
				 			<input type="hidden"  name="background" id="background_path"  class="form-control">
		            </div>
		    	</div>
			
<!-- 
			<div class="form-group">
              <label class="col-sm-2 control-label" for="seo_title">SEO标题：</label>
                <div class="col-sm-8">
                  <input type="text"  name="seo_title" id="seo_title"  class="form-control" value="{$shopInfo['seo_title']}">
                </div>
            </div>

			<div class="form-group">
              <label class="col-sm-2 control-label" for="seo_keyword">SEO关键词：</label>
                <div class="col-sm-8">
                  <input type="text"  name="seo_keyword" id="seo_keyword"  class="form-control" value="{$shopInfo['seo_keyword']}">
                </div>
            </div>
			  <div class="form-group">
              <label class="col-sm-2 control-label" for="seo_desc">SEO描述：</label>
              <div class="col-sm-8">
                 <textarea id="seo_desc" name="seo_desc" rows="5"   class="form-control"> {$shopInfo['seo_desc']}</textarea>
              </div>
-->
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button class="btn btn-default" type="submit" value="1" >保存</button>
                <span class="text-success" id="tipsUser"></span>
              </div>
            </div>
          </form>
      		<!-- 基本资料 end -->
      </div>
  </div>
  </div>
<script src="static/js/model/user/shop.js"></script>
<script src="static/js/uploadify/jquery.uploadify.min.js?r={RANDOM_PARA}" type="text/javascript"></script>
<link href="static/js/uploadify/uploadify.css" rel="stylesheet">
<script type="text/javascript">
        $(function(){
        	setTimeout(function(){
            	uploadify({file:'upload1',debug:false,text:'上传图片',auto:true,limit:1,hide:false},{sessionId:sessionId},uploadR1);
        	},500);
        });
		 $(function(){
			 setTimeout(function(){
            	uploadify({file:'upload2',debug:false,text:'上传图片',auto:true,limit:1,hide:false},{sessionId:sessionId},uploadR2);
        	},500);
        });
		function uploadR1(json){
			$('#banner_path').val(json.msg.url);
			$('#banner_img').prop('src',json.msg.url);
		}
		function uploadR2(json){
			$('#background_path').val(json.msg.url);
			$('#background_img').prop('src',json.msg.url);
		}
</script>
<!--{template user/footer}-->